home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / rexx / preview.rexx < prev    next >
OS/2 REXX Batch file  |  1994-08-12  |  552b  |  28 lines

  1. /* PlaySID example */
  2.  
  3. if(~show('l', 'rexxsupport.library'))then do
  4.    if(~addlib( 'rexxsupport.library', 0, -30, 0))then do
  5.       say "Could not open ARexx support library."
  6.       exit 10
  7.    end
  8. end
  9.  
  10. parse arg name
  11. path = "sid:music/"
  12.  
  13. address command "run SID:PlaySID"
  14. say "Loading"
  15. if SID_Load(path || name) then do
  16.    numtunes =  SID_NumTunes()
  17.    say "Found" numtunes "tunes"
  18.    do tune = 1 to numtunes
  19.       say "Playing tune" tune
  20.       SID_SetTune(tune)
  21.       SID_Play()
  22.       Delay(5 * 50)
  23.    end
  24.    say "Stopped"
  25.    SID_Stop()
  26. end
  27. SID_Quit()
  28.